package com.zhoutao123.hephaestus.object.bussiness;

import com.zhoutao123.hephaestus.repository.entity.Menu;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

@Data
@Accessors(chain = true)
public class VMenu  implements Serializable {

  private String id;

  private String name;

  private String icon;

  private List<VMenu> subMenuList;

  public static VMenu of(Menu menu) {
    return new VMenu().setId(menu.getId()).setName(menu.getName()).setIcon(menu.getIcon());
  }
}
